package com.liruo.test.annoall;

import javax.inject.Named;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;

@SpringBootApplication
public class AnnoAllApplication {

  public static void main(String[] args) {
    SpringApplication.run(AnnoAllApplication.class, args);
  }

  @Primary
  @Bean
  public Bean1 bean1() {
    return new Bean1("bean1");
  }

  @MQualifier("MQBean2")
  @Bean
  public Bean1 bean2() {
    return new Bean1("bean2");
  }

  @Named("namedBean2")
  public NamedBean namedBean2() {
    return new NamedBean("namedBean2");
  }

  @SpringQualifier
  @Bean
  public SpringBean springBeanXXX() {
    return new SpringBean("SpringQualifier");
  }
}
